<template>
  <div class="box">
    <router-view></router-view>
  </div>  
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {},
  mounted() {
    (function(doc, win) {
      var docEl = win.document.documentElement;
      var resizeEvt =
        "orientationchange" in window ? "orientationchange" : "resize";
      var refreshRem = function() {
        var clientWidth =
          win.innerWidth ||
          doc.documentElement.clientWidth ||
          doc.body.clientWidth;

        console.log(clientWidth);
        if (!clientWidth) return;
        var fz;
        var width = clientWidth;
        fz = (((16 * width) / 375) * 10) / 16;
        docEl.style.fontSize = fz + "px";
      };

      if (!doc.addEventListener) return;
      win.addEventListener(resizeEvt, refreshRem, false);
      doc.addEventListener("DOMContentLoaded", refreshRem, false);
      refreshRem();
    })(document, window);
  }
};
</script>

<style scoped>
.box{
  width: 100%;
  height:100vh;
}
</style>